#!/bin/sh

# must not fail
set -e 

# debug
#set -x 

echo "Starting $0"

SC20_FILENAME=smartcard2.0-upgrade

### htmf

if [ ! -f ${DISTFILES_INSTALL}/${SC20_FILENAME} ] ; then
    echo "copying ${SC20_FILENAME} to ${DISTFILES_INSTALL}"
    cp ${SC20_FILENAME}      ${DISTFILES_INSTALL}
fi
   
cp ${SC20_FILENAME} ${SMARTCARD20_HOME}/${SC20_FILENAME}

### chmod
chown -R  ${appsrvuser}.${appsrvgrp} ${SMARTCARD20_HOME}/${SC20_FILENAME}
chmod 755                            ${SMARTCARD20_HOME}/${SC20_FILENAME}


echo "End of $0"
